package tn.orange.canreminder.mock;

import java.util.ArrayList;
import java.util.List;

import tn.orange.canreminder.model.Competition;
import tn.orange.canreminder.model.Country;
import tn.orange.canreminder.model.Opinion;
import tn.orange.canreminder.model.Phase;
import tn.orange.canreminder.model.Place;
import tn.orange.canreminder.model.PlacesCategory;
import tn.orange.canreminder.model.Poule;

public class MockObject {

	private static String[] strings = new String[] { "Poule A", "Poule B",
			"Poule C", "Poule D" };

	public static List<Competition> getMockCompetitions() {

		List<Competition> competitions = new ArrayList<Competition>();

		Competition competition = new Competition();
		competition.setCompetitiondate("27-01-2012 15:45:00");
		competition.setScorefinal1(0);
		competition.setScorefinal2(0);
		competition.setCountryone_id(1);
		competition.setCountrytwo_id(2);
		competition.setPoule_id(-1);
		competition.setIseleminationcompetition(true);
		competition.setIspoulecompetition(false);
		competition.setScorefinalpro1(0);
		competition.setScorefinalpro2(0);
		competition.setScorepenalty1(5);
		competition.setScorepenalty2(4);
		competition.setPhase_id(1);
		competitions.add(competition);

		Competition competition1 = new Competition();
		competition1.setCompetitiondate("27-01-2012 15:45:00");
		competition1.setIseleminationcompetition(false);
		competition1.setIspoulecompetition(true);
		competition1.setScorefinal1(5);
		competition1.setScorefinal2(0);
		competition1.setCountryone_id(3);
		competition1.setCountrytwo_id(4);
		competition1.setPoule_id(0);
		competitions.add(competition1);

		Competition competition2 = new Competition();
		competition2.setCompetitiondate("27-01-2012 15:45:00");
		competition2.setIseleminationcompetition(true);
		competition2.setIspoulecompetition(false);
		competition2.setScorefinal1(1);
		competition2.setScorefinal2(1);
		competition2.setCountryone_id(3);
		competition2.setCountrytwo_id(4);
		competition2.setPhase_id(1);
		competition.setScorefinalpro1(3);
		competition.setScorefinalpro2(2);
		competition.setScorepenalty1(-1);
		competition.setScorepenalty2(-1);
		competition2.setPoule_id(-1);
		competitions.add(competition2);
//
//		Competition competition3 = new Competition();
//		competition3.setCompetitiondate("29-12-2011 15:45:00");
//		competition3.setIseleminationcompetition(true);
//		competition3.setIspoulecompetition(false);
//		competition3.setScorefinal1(-1);
//		competition3.setScorefinal2(-1);
//		competition3.setCountryone_id(2);
//		competition3.setCountrytwo_id(4);
//		competition3.setPhase_id(2);
//		competition3.setScore_final_pro1(-1);
//		competition3.setScore_final_pro2(2 - 1);
//		competition3.setScore_penalty1(-1);
//		competition3.setScore_penalty2(-1);
//		competition3.setPoule_id(-1);
//		competitions.add(competition3);

		return competitions;
	}

	public static List<Poule> getMockPoules() {
		List<Poule> poules = new ArrayList<Poule>();
		for (int i = 0; i < 4; i++) {

			Poule poule = new Poule();
			poule.setId(i);
			poule.setName(strings[i]);
			poules.add(poule);

		}
		return poules;

	}

	public static List<Country> getMockCountries() {
		List<Country> countries = new ArrayList<Country>();

		Country country = new Country();
		country.setId(1);
		country.setName("Tunisie");

		country.setNameslug("tunisie");
		countries.add(country);

		Country country1 = new Country();
		country1.setId(2);
		country1.setName("Maroc");
		country1.setNameslug("maroc");
		countries.add(country1);

		Country country2 = new Country();
		country2.setId(3);
		country2.setName("Lybie");
		country2.setNameslug("lybie");
		countries.add(country2);

		Country country3 = new Country();
		country3.setId(4);
		country3.setName("Mali");
		country3.setNameslug("mali");
		countries.add(country3);

		Country country4 = new Country();
		country4.setId(5);
		country4.setName("Angola");
		country4.setNameslug("angola");
		countries.add(country4);

		Country country5 = new Country();
		country5.setId(6);
		country5.setName("Botswana");
		country5.setNameslug("botswana");
		countries.add(country5);

		Country country6 = new Country();
		country6.setId(7);
		country6.setName("Burkinafaso");
		country6.setNameslug("burkinafaso");
		countries.add(country6);

		Country country8 = new Country();
		country8.setId(9);
		country8.setName("Soudan");
		country8.setNameslug("soudan");
		countries.add(country8);

		Country country9 = new Country();
		country9.setId(10);
		country9.setName("Zambie");
		country9.setNameslug("zambie");
		countries.add(country9);

		return countries;

	}

	public static List<PlacesCategory> getMockPlacesCategory() {
		List<PlacesCategory> placesCategories = new ArrayList<PlacesCategory>();

		PlacesCategory placesCategory = new PlacesCategory();
		placesCategory.setId(1);
		placesCategory.setName("Hotel");
		placesCategories.add(placesCategory);

		PlacesCategory placesCategory2 = new PlacesCategory();
		placesCategory2.setId(2);
		placesCategory2.setName("Restaurant");
		placesCategories.add(placesCategory2);

		PlacesCategory placesCategory3 = new PlacesCategory();
		placesCategory3.setId(3);
		placesCategory3.setName("Cafe");
		placesCategories.add(placesCategory3);

		PlacesCategory placesCategory4 = new PlacesCategory();
		placesCategory4.setId(4);
		placesCategory4.setName("Bar");
		placesCategories.add(placesCategory4);

		return placesCategories;

	}

	public static List<Place> getMockPlaces() {

		List<Place> places = new ArrayList<Place>();

		Place place = new Place();
		place.setAdresse("2 Rue Ibn Nafis Cite Gazella 2083");
		place.setLatitude(36.8865);
		place.setLongitude(10.1725);
		place.setName("Café Gazella");
		place.setTelephone("55847586");
		place.setRating("5");
		places.add(place);

		Place place1 = new Place();
		place1.setAdresse("2 Rue Ibn Nafis Cite Gazella 2083");
		place1.setLatitude(36.88686);
		place1.setLongitude(10.172817);
		place1.setRating("3.8");
		place1.setName("Café Gazella");
		place1.setTelephone("55847586");
		places.add(place1);

		Place place2 = new Place();
		place2.setAdresse("2 Rue Ibn Nafis Cite Gazella 2083");
		place2.setLatitude(36.88635);
		place2.setLongitude(10.1719945);
		place2.setName("Café Gazella");
		place2.setTelephone("55847586");
		place2.setRating("1.2");
		places.add(place2);

		return places;

	}

	public static List<Opinion> getMockOpinions() {
		List<Opinion> opinions = new ArrayList<Opinion>();

		Opinion opinion = new Opinion();
		opinion.setArticle(" Très bonne cuisine classique cadre exceptionnel");
		opinion.setPlace_id(2);
		opinion.setUsername("kassis.bassem");
		opinions.add(opinion);

		Opinion opinion1 = new Opinion();
		opinion1.setArticle(" Très bonne cuisine classique cadre exceptionnel");
		opinion1.setPlace_id(2);
		opinion1.setUsername("kassis.bassem");
		opinions.add(opinion1);

		Opinion opinion2 = new Opinion();
		opinion2.setArticle(" Très bonne cuisine classique cadre exceptionnel");
		opinion2.setPlace_id(2);
		opinion2.setUsername("kassis.bassem");
		opinions.add(opinion2);
		return opinions;
	}

	public static List<Phase> getMockPhases() {
		List<Phase> phases = new ArrayList<Phase>();

		Phase phase = new Phase();
		phase.setId(1);
		phase.setName(" quart du final");
		phases.add(phase);

		Phase phase1 = new Phase();
		phase1.setId(1);
		phase1.setName(" demi final");
		phases.add(phase1);

		Phase phase2 = new Phase();
		phase2.setId(1);
		phase2.setName("final");
		phases.add(phase2);

		return phases;

	}
}
